package com.laf.manager.dto;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author ygl
 * @create 2018-12-26
 * @DESCRIPTION
 * 会员绑定的车辆列表
 **/
@Data
public class MemberCar implements RowMapper<MemberCar>, Serializable {

    private int id;
    /**
     * 会员ID
     */
    private int memberId;
    /**
     * 车牌号
     */
    private String carNumber;

    @Override
    public MemberCar mapRow(ResultSet rs, int rowNum) throws SQLException {
        MemberCar model = new MemberCar();
        model.setId(rs.getInt("id"));
        model.setMemberId(rs.getInt("member_id"));
        model.setCarNumber(rs.getString("car_number"));
        return model;
    }
}
